<template>
  <div class="box-img">
    <img :src="mvItem.imgurl" alt="">
    <div class="count">
      <i class="iconfont iconbofang"/>
      <span class="playCount">
        {{mvItem.playCount}}
      </span>
    </div>
    <span class="duration">{{mvItem.duration}}</span>
  </div>
  <p class="mv-name" :title="mvItem.name">{{mvItem.name}}</p>
</template>

<script lang="ts">
export default {
  name: 'MVItem',
  props: {
    mvItem: {
      type: Object,
      default: () => ({})
    }
  }
}
</script>

<style lang="scss" scoped>
.box-img {
  position: relative;

  >img {
    width: 100%;
    border-radius: 5px;
    border: 1px solid #D0D0D0;
  }

  .count {
    position: absolute;
    top: 8px;
    right: 5px;
    color: #fff;
    font-size: 12px;
    display: flex;
    align-items: center;

    >i {
      padding-right: 4px;
      font-size: 16px;
    }
  }

  .duration {
    position: absolute;
    bottom: 8px;
    right: 5px;
    color: #fff;
    font-size: 12px;
  }
}

.mv-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  padding-top: 10px;
  font-size: 15px;
  color: #333333;
  line-height: 1.2;
}
</style>
